<tr data-identifier-hash="<%= @result.address_hash %>-<%= if @result.tx_hash, do: Base.encode16(@result.tx_hash, case: :lower), else: "" %>-<%= if @result.block_hash, do: Base.encode16(@result.block_hash, case: :lower), else: "" %>">
  <!-- incremented number by order in the list -->
  <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
  <%= case @result.type do %>
        <% "token" -> %>
            <td class="token-icon">
                <span
                    class="token-icon mr-1"
                    data-address-hash="<%= @result.address_hash %>"
                >
                <%= if Application.get_env(:block_scout_web, :display_token_icons) do %>
                    <% chain_id_for_token_icon = Application.get_env(:block_scout_web, :chain_id) %>
                    <% address_hash = @result.address_hash %>
                    <%=
                        render BlockScoutWeb.TokensView,
                        "_token_icon.html",
                        chain_id: chain_id_for_token_icon,
                        address: address_hash
                    %>
                <% end %>
                </span>
            </td>
            <td class="stakes-td">
                <% res = @result.name <> " (" <> @result.symbol <> ")" %>
                <a href="<%= token_path(@conn, :show, @result.address_hash) %>">
                    <%= highlight_search_result(res, @query) %>
                </a>
            </td>
        <% "address" -> %>
            <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
            <%= render BlockScoutWeb.SearchView, "_name_td.html", result: @result, query: @query, conn: @conn %>
        <% "contract" -> %>
            <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
            <%= render BlockScoutWeb.SearchView, "_name_td.html", result: @result, query: @query, conn: @conn %>
        <% "block" -> %>
            <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
            <td class="stakes-td">
                <%= link(
                    highlight_search_result(to_string(@result.block_number), @query),
                    to: block_path(@conn, :show, @result.block_number)
                ) %>
            </td>
        <% _ -> %>
            <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
            <%= render BlockScoutWeb.SearchView, "_empty_td.html" %>
  <% end %>
  <td class="stakes-td">
    <%= case @result.type do %>
        <% "token" -> %>
            <%= with {:ok, address_hash} = Chain.string_to_address_hash(@result.address_hash),
            {:ok, address} <- Chain.hash_to_address(address_hash) do %>
                <%= render BlockScoutWeb.AddressView,
                "_link.html",
                address: address,
                contract: false,
                use_custom_tooltip: false
                %>
            <% end %>
        <% "address" -> %>
            <%= with {:ok, address_hash} = Chain.string_to_address_hash(@result.address_hash),
            {:ok, address} <- Chain.hash_to_address(address_hash) do %>
                <%= render BlockScoutWeb.AddressView,
                "_link.html",
                address: address,
                contract: false,
                use_custom_tooltip: false
                %>
            <% end %>
        <% "contract" -> %>
            <%= with {:ok, address_hash} = Chain.string_to_address_hash(@result.address_hash),
            {:ok, address} <- Chain.hash_to_address(address_hash) do %>
                <%= render BlockScoutWeb.AddressView,
                "_link.html",
                address: address,
                contract: true,
                use_custom_tooltip: false
                %>
            <% end %>
        <% "transaction" -> %>
            <%= render BlockScoutWeb.TransactionView,
            "_link.html",
            transaction_hash: "0x" <> Base.encode16(@result.tx_hash, case: :lower) %>
        <% "user_operation" -> %>
            <%= "0x" <> Base.encode16(@result.user_operation_hash, case: :lower) %>
        <% "blob" -> %>
            <%= "0x" <> Base.encode16(@result.blob_hash, case: :lower) %>
        <% "block" -> %>
            <%= link(
                "0x" <> Base.encode16(@result.block_hash, case: :lower),
                to: block_path(@conn, :show, @result.block_number)
            ) %>
        <% _ -> %>
    <% end %>
  </td>
  <td class="stakes-td">
    <div class="bs-label <%= @result.type %>"><%= @result.type %></div>
  </td>
</tr>
